import request from '@/utils/request'

// 保存
export function saveCard(data) {
  return request({
    url: '/couponAdmin/card/saveCard',
    method: 'post',
    data: data
  })
}

// 列表
export function cardList(data) {
  return request({
    url: '/couponAdmin/card/list',
    method: 'post',
    data: data
  })
}
// 列表
export function getCanUseCard(data) {
  return request({
    url: '/couponAdmin/card/getCanUseCard',
    method: 'post',
    data: data
  })
}

// 详情
export function cardDetail(params) {
  return request({
    url: '/couponAdmin/card/cardDetail',
    method: 'get',
    params: params
  })
}

// 状态
export function cardStatus(data) {
  return request({
    url: '/couponAdmin/card/status',
    method: 'post',
    data: data
  })
}

// 核销门店
export function cardVerifyShops(params) {
  return request({
    url: '/couponAdmin/card/verifyShops',
    method: 'get',
    params: params
  })
}

// 投放统计
export function cardIssueCount(data) {
  return request({
    url: '/couponAdmin/records/card/issueCount',
    method: 'post',
    data: data
  })
}

// 投放列表
export function cardIssueList(data) {
  return request({
    url: '/couponAdmin/records/card/issueList',
    method: 'post',
    data: data
  })
}

// 投放统计
export function cardVerifyCount(data) {
  return request({
    url: '/couponAdmin/records/card/verifyCount',
    method: 'post',
    data: data
  })
}

// 投放列表
export function cardVerifyList(data) {
  return request({
    url: '/couponAdmin/records/card/verify',
    method: 'post',
    data: data
  })
}

/* 表格 */
// 列表
export function searchCard(data) {
  return request({
    url: '/couponAdmin/card/searchCard',
    method: 'post',
    data: data
  })
}
// 状态
export function statusCard(data) {
  return request({
    url: '/couponAdmin/card/status',
    method: 'post',
    data: data
  })
}
// 草稿箱删除
export function deleteDraft(data) {
  return request({
    url: '/couponAdmin/card/deleteDraft',
    method: 'post',
    data: data
  })
}
// 保存并启用
export function saveAndOpenUpCard(data) {
  return request({
    url: '/couponAdmin/card/saveAndOpenUpCard',
    method: 'post',
    data: data
  })
}
